//
//  OBMomentProfileViewModel.m
//  WeChat
//
//  Created by 黄柳姣 on 2018/5/2.
//  Copyright © 2018年 obally. All rights reserved.
//  个人信息视图模型

#import "OBMomentProfileViewModel.h"
@interface OBMomentProfileViewModel ()
/// 用户模型
@property (nonatomic, readwrite, strong) OBUserModel *user;

/// 昵称
@property (nonatomic, readwrite, copy) NSAttributedString *screenNameAttr;


@end
@implementation OBMomentProfileViewModel
- (instancetype)initWithUser:(OBUserModel *)user
{
    if (self = [super init]) {
        self.user = user;
        ///设置昵称的外部阴影
        NSMutableAttributedString *nickNameAttr = [[NSMutableAttributedString alloc]initWithString:user.nick];
        nickNameAttr.alignment = NSTextAlignmentRight;
        nickNameAttr.font = OBFont(20.0f, NO);
        nickNameAttr.color = [UIColor whiteColor];
        YYTextShadow *textShadow = [YYTextShadow new];
        textShadow.color = OBColorFromHexString(@"#212227");
        textShadow.radius = 2;
        nickNameAttr.textShadow = textShadow;
        self.screenNameAttr = nickNameAttr;
    }
    return self;
}
- (CGFloat)height
{
    return OB_SCREEN_WIDTH + 50;
}
@end
